#include <stdlib.h>
#include <sstream>
#include <iostream>
#include <windows.h>

int main(int argc, char * argv[]){
	std::string path(argv[1]);
	for(std::string::reverse_iterator it = path.rbegin(); *it!='\\'; ++it)*it = '\0';
	std::stringstream command;
	command << " -e \"plot '" << argv[1] << "' using 1:2 lw 2 with lines , '" << argv[1] << "' using 1:3 with lines, '" << argv[1] << "' using 1:4 with lines;\" -" ;
	ShellExecute(NULL,  "open","wgnuplot.exe",command.str().c_str(),path.c_str(),SW_SHOWNORMAL);
}